package cn.lili.timetask.handler.impl.order;

import cn.lili.modules.payment.client.RechargeClient;
import cn.lili.timetask.handler.EveryMinuteExecute;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 充值订单自动取消（每分钟执行）
 *
 * @author zhuhai
 * @since 2021/3/11
 **/
@Slf4j
@Component
@RequiredArgsConstructor
public class RechargeOrderTaskExecute implements EveryMinuteExecute {
    /**
     * 充值
     */
    private final RechargeClient rechargeClient;


    @Override
    public void execute() {
        rechargeClient.autoCancel();
    }
}
